/**
 * Copyright (c) 2016-2019 九点科技 All rights reserved.
 *
 * http://www.9dyun.cn
 *
 * 版权所有，侵权必究！
 */
package com.dian.modules.sale.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import com.baomidou.mybatisplus.annotation.TableField;
import com.dian.common.validator.group.AddGroup;
import com.dian.common.validator.group.UpdateGroup;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.math.BigDecimal;
import com.dian.common.entity.BaseEntity;
import java.util.Date;
import java.util.List;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.hibernate.validator.constraints.Length;
/**
 * 预订单明细
 *
 * @author xiaolai
 * @email xiaolai@9dyun.cn
 * @date 2019-06-10 23:04:30
 */
@Data
@TableName("sale_prob_line")
@ExcelTarget("probLineEntity")
public class ProbLineEntity extends BaseEntity {
	private static final long serialVersionUID = 1L;


    /**
	 * 预销售订单id
	 */
    private Long probId;
    /**
	 * 商品id;来源于base_goods.id
	 */
    @NotNull(message="商品id不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Long goodsId;


    /**
	 * 商品编码;来源于base_goods.goods_code
	 */

    @Excel(name = "商品编码",width = 30, orderNum ="0")
    @NotBlank(message="商品编码不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="商品编码长度不能超过40个字符")
    private String goodsCode;
    /**
	 * 商品名称;来源于base_goods.name
	 */
    @Excel(name = "商品名称",width = 80, orderNum ="1")
    @NotBlank(message="商品名称不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=200,  groups ={AddGroup.class, UpdateGroup.class}, message="商品名称长度不能超过200个字符")
    private String goodsName;


    /**
	 * 商品型号;来源于base_goods.goods_model
	 */
    @Excel(name = "商品型号", orderNum ="2")
    @NotBlank(message="商品型号不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="商品型号长度不能超过100个字符")
    private String goodsModel;


    /**
	 * 商品规格;来源于base_goods.goods_space
	 */
    @Excel(name = "商品规格", orderNum ="3")
    @NotBlank(message="商品规格不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=100,  groups ={AddGroup.class, UpdateGroup.class}, message="商品规格长度不能超过100个字符")
    private String goodsSpec;


    /**
     * 商品数量
     */
    @Excel(name = "基本数量", orderNum ="4")
    @NotNull(message="基本数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal baseNum;


    /**
     * 基本单位id;来源于base_uom.id
     */
    @NotNull(message="基本单位id不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Long baseUomId;


    /**
     * 基本单位;来源于base_uom.name_name
     */
    @Excel(name = "基本单位", orderNum ="5")
    @NotBlank(message="基本单位不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="计量单位长度不能超过40个字符")
    private String baseUomName;


    /**
     *库存数量
     */
    @Excel(name = "库存数量", orderNum ="6")
    @NotNull(message="库存数量不能为空", groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal qtyNum;


    /**
     * 库存单位id;来源于base_uom.id
     */
    @NotNull(message="库存单位id不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Long qtyUomId;


    /**
     * 库存单位;来源于base_uom.name_name
     */
    @Excel(name = "库存单位", orderNum ="7")
    @NotBlank(message="库存单位不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="计量单位长度不能超过40个字符")
    private String qtyUomName;


    /**
     * 商品数量
     */
    @Excel(name = "辅助数量", orderNum ="8")
    @NotNull(message="辅助数量不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal auxNum;


    /**
     * 辅助单位id;来源于base_uom.id
     */
    @NotNull(message="辅助单位id不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private Long auxUomId;


    /**
     * 辅助单位;来源于base_uom.name_name
     */
    @Excel(name = "辅助单位", orderNum ="9")
    @NotBlank(message="辅助单位不能为空",  groups ={AddGroup.class, UpdateGroup.class})
    @Length(max=40,  groups ={AddGroup.class, UpdateGroup.class}, message="计量单位长度不能超过40个字符")
    private String auxUomName;


    /**
	 * 商品单价
	 */
    @Excel(name = "商品单价", orderNum ="9")
    @NotNull(message="商品单价不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal goodsPrice;



    /**
	 * 商品挂牌价
	 */
    @Excel(name = "商品挂牌价", orderNum ="10")
    @NotNull(message="商品挂牌价不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal goodsListPrice;


    /**
	 * 商品金额
	 */
    @Excel(name = "商品金额", orderNum ="11")
    @NotNull(message="商品金额不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal goodsAmount;



    /**
	 * 商品折扣
	 */
    @Excel(name = "商品折扣", orderNum ="12")
    @NotNull(message="商品折扣不能为空",groups = {AddGroup.class,UpdateGroup.class})
    private BigDecimal goodsDiscount;


    /**
	 * 件换算
	 */
    @Excel(name = "库存换算单位", orderNum ="13")
    private BigDecimal converUnit1;
    /**
	 * 片换算
	 */
    @Excel(name = "辅助换算单位", orderNum ="14")
    private BigDecimal converUnit2;
}
